<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="user-scalable=no,width=device-width, initial-scale=1" id="viewport" name="viewport" initial-scale="1">

<script language="javascript" type="text/javascript" src="../js/js/baseJs.js"></script>

</head>
<body>

<div class="project-detail" id="projectList" style="display: none; ">
  <div class="wap-header">合伙创业列表
    <a class="back" onClick="javascript:window.history.back();return false;"></a>
  </div>
  <div class="crowd-funding-list-bd" style="background:#f5f5f5"> 
      <div class="one-bd" v-for="crowdFunding in crowdFundingListData">
        <a :href="getProjectUrl(crowdFunding.id)"> 
          <div class="image-c"> 
            <img :src="getFirstImage(crowdFunding.images)">
          </div>
          
          <div class="title-c">{{crowdFunding.name}}</div>
          <div class="price-c">
            <div class="price">￥{{crowdFunding.price}}</div>
            <div class="people"><span style="color:#e4343e">{{crowdFunding.joinNumber}}</span>/{{crowdFunding.number}}</div>
          </div>
        </a>  
        
      </div> 
      <div class="clearfix"></div>
  </div>
</div>
<script src="../js/js/rem_fix.js"></script>
<script src="../js/js/common.js"></script>
<script type="text/javascript">
  var url=window.location.hash;
  var id=url.split("#")[1];
  console.log(id)
  var invitationCode=getCookie("invitationCode");
  console.log(invitationCode)
  var projectDetailApp = new Vue({
      el: '#projectList',
      data: {
          crowdFundingListData:''
      },
      ready:function(){
        $("#projectList").show();        
        var url="/crowdfunding/getCrowdfundings";
        var data={
          page:1,
          size:200
        }
        pushData(url,data,function(res){
          console.log(res)
          if(res.state){
            this.crowdFundingListData=res.data.crowdfundings;
            console.log(this.crowdFundingListData)
            //this.imageList=this.crowdFundingListData.images.split(",")
          }else{
            alert(res.message)
          }
        }.bind(this))

      },
      methods:{
  
        getProjectUrl:function(id){        
          return "/publicBundle/getCrowdFundingProject.mobile.html?id="+id      
        },
        getFirstImage:function(projectImages){
           var imageList=projectImages.split(",")
           return imageList[0];
        }

      }
    })
</script>

</body>
</html>